<template>
  <div>
    <p class='add-wrap'>
      <el-button @click.stop='goBack'><i class="el-icon-arrow-left el-icon--left"></i>返回上层</el-button>
      <a class="btn" @click.stop="dialogVisible = true">
        <i class="fa fa-plus"></i>新增
      </a>
    </p>

    <add-dialog :confIdList='confIdList' :dialogVisible.sync='dialogVisible'/>

  </div>
</template>

<script>
import AddDialog from './addDialog'
export default {
  components: {
    AddDialog
  },
  data () {
    return {
      dialogVisible: false,
      confIdList: []
    }
  },
  methods: {

    goBack () {
      this.$router.push({ path: '/backStageManager/projectManage' })
    },

    getAllLeaveConfId () {
      this.Axios
        .Post('/wfConfLeaveTypeInfo/getAllLeaveConfId')
        .then((res) => {
          this.confIdList = res.data.datas
        })
    },

  },
  mounted () {
    this.getAllLeaveConfId()
  }
}
</script>

<style scoped>
.add-wrap {
  margin-left: 20px;
}
.btn {
  height: 26px;
  line-height: 26px;
  text-align: center;
  color: #fff;
  display: inline-block;
  background-color: #18a689;
  border-radius: 5px;
  padding: 5px;
  min-width: 60px;
  margin: 20px 0 20px 20px;
  cursor: pointer;
}
.btn i {
  margin-right: 2px;
}
</style>